package ws.jdbc.concurrent.driver.sqlserver.cursor

import static java.sql.ResultSet.*
import ws.jdbc.concurrent.driver.sqlserver.*

/**
 * Common test case of CursorScrollableReadOnly class methods.
 * 
 * @author Wilson Santos, 36228 <wilson.santos@ua.pt>
 */
class CursorScrollableReadOnlyTest extends ScrollableReadOnlyTest {

  /**
   * Test of previous() method for multiple threads.
   */
  void testNextThreads() {
    println "testNextThreads()"

    runThreads {
      super.testNextLoop(stmt.getCursor())
    }
  }

  /**
   * Test of previous() method for multiple threads.
   */
  void testPreviousThreads() {
    println "testPreviousThreads()"

    runThreads {
      super.testPrevious(stmt.getCursor())
    }
  }

  /**
   * Test of absolute() method for multiple threads.
   */
  void testAbsoluteThreads() {
    println "testAbsoluteThreads()"

    runThreads {
      super.testAbsolute(stmt.getCursor())
    }
  }

  /**
   * Test of relative() method for multiple threads.
   */
  void testRelativeThreads() {
    println "testRelativeThreads()"

    runThreads {
      super.testRelative(stmt.getCursor())
    }
  }

  /**
   * Test of first() method for multiple threads.
   */
  void testFirstThreads() {
    println "testFirstThreads()"

    runThreads {
      super.testFirst(stmt.getCursor())
    }
  }

  /**
   * Test of beforeFirst() for multiple threads.
   */
  void testBeforeFirstThreads() {
    println "testBeforeFirstThreads()"

    runThreads {
      super.testBeforeFirst(stmt.getCursor())
    }
  }

   /**
   * Test of last() method for multiple threads.
   */
  void testLastThreads() {
    println "testLastThreads()"

    runThreads {
      super.testLast(stmt.getCursor())
    }
  }

  /**
   * Test of afterLast() for multiple threads.
   */
  void testAfterLastThreads() {
    println "testAfterLastThreads()"

    runThreads {
      super.testAfterLast(stmt.getCursor())
    }
  }
}